c# underscore variable

116

c# underscore variable -

// The underscore before a variable name is a naming convention 
// _val, is used when defining
// the private member variable for a public property.

// Example usage:
private string _val;
public string Values
{
    get { return _val;}
    set {_val = value;}
}

Comments

Submit
0 Comments